package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsDto;
import com.heima.model.wemedia.dtos.WmNewsPageReqDto;
import com.heima.model.wemedia.pojos.WmNews;
import net.sourceforge.tess4j.TesseractException;

import java.io.IOException;

public interface WmNewsService extends IService<WmNews> {
    /**
     * 根据条件分页查询文章数据
     * @param wmNewsPageReqDto
     * @return
     */
    ResponseResult listWmNews(WmNewsPageReqDto wmNewsPageReqDto);

    /**
     * 新增或者更新文章
     * @param dto
     * @return
     */
    ResponseResult submitNews(WmNewsDto dto) throws TesseractException, IOException;
}
